import redis


def redis_func():
    Pool = redis.ConnectionPool(host='127.0.0.1', port=6379, db=0, encoding='utf8', max_connections=1000)
    conn = redis.Redis(connection_pool=Pool)
    return conn


redis_client = redis_func()
